﻿@{
    Layout = "_LayoutalertForm";
    ViewData["title"] = "模块添加";
}

<form id="form1">
    <div style="margin-top: 10px; margin-left: 10px; margin-right: 20px;">
        <table class="form">
            <tr>
                <th class="formTitle">上级</th>
                <td class="formValue">
                    <select id="ParentId" name="ParentId" class="form-control">
                        <option value="0">父节点</option>
                    </select>
                </td>
                <th class="formTitle">名称</th>
                <td class="formValue">
                    <input id="FullName" name="FullName" type="text" class="form-control" />
                </td>
            </tr>
            <tr>
                <th class="formTitle">连接</th>
                <td class="formValue">
                    <input id="UrlAddress" name="UrlAddress" type="text" class="form-control" />
                </td>
                <th class="formTitle">目标</th>
                <td class="formValue">
                    <select id="Target" name="Target" class="form-control">
                        <option value="">--</option>
                        <option value="expand">expand</option>
                        <option value="iframe">iframe</option>
                        <option value="open">open</option>
                        <option value="blank">blank</option>
                    </select>
                </td>
            </tr>
            <tr>
                <th class="formTitle">图标</th>
                <td class="formValue">
                    <div class="input-group">
                        <input id="Icon" name="Icon" type="text" class="form-control">
                        <span class="input-group-btn">
                            <a class="btn  btn-primary"><i class="fa fa-ellipsis-h"></i></a>
                        </span>
                    </div>
                </td>
                <th class="formTitle">排序</th>
                <td class="formValue">
                    <input id="SortCode" name="SortCode" type="text" class="form-control required" />
                </td>
            </tr>
            <tr>
                <th class="formTitle" style="height: 35px;">选项</th>
                <td class="formValue" colspan="3" style="padding-top: 1px;">
                    <div class="ckbox">
                        <input id="IsMenu" name="IsMenu" type="checkbox"><label for="IsMenu">菜单</label>
                    </div>
                    <div class="ckbox">
                        <input id="IsPublic" name="IsPublic" type="checkbox"><label for="IsPublic">公共</label>
                    </div>
                    <div class="ckbox">
                        <input id="IsExpand" name="IsExpand" type="checkbox"><label for="IsExpand">展开</label>
                    </div>
                    <div class="ckbox">
                        <input id="EnabledMark" name="EnabledMark" type="checkbox" checked="checked"><label for="EnabledMark">有效</label>
                    </div>

                    <div class="ckbox">
                        <input id="AllowEdit" name="AllowEdit" type="checkbox"><label for="AllowEdit">允许编辑</label>
                    </div>
                    <div class="ckbox">
                        <input id="AllowDelete" name="AllowDelete" type="checkbox"><label for="AllowDelete">允许删除</label>
                    </div>
                </td>
            </tr>
            <tr>
                <th class="formTitle" valign="top" style="padding-top: 5px;">
                    介绍
                </th>
                <td class="formValue" colspan="3">
                    <textarea id="Description" name="Description" class="form-control" style="height: 100px;"></textarea>
                </td>
            </tr>
            <tr>
            
                <th class="formTitle">创建时间</th>
                <td class="formValue">
                    <input id="CreatorTime" name="CreatorTime" type="text" class="form-control" />
                </td><th class="formTitle"></th>
<td class="formValue"></td>
            </tr>
            @*<tr>
                <th class="formTitle">修改人员</th>
                <td class="formValue">
                    <input id="LastModifyUserId" name="LastModifyUserId" type="text" class="form-control" />
                </td>
                <th class="formTitle">修改时间</th>
                <td class="formValue">
                    <input id="LastModifyTime" name="LastModifyTime" type="text" class="form-control" />
                </td>
            </tr>*@
        </table>
    </div>
</form>

@section scripts{
    <script type="text/javascript">
        $(function () {
            initControl();
        });

        function initControl() {
            $("#Target").select2({ minimumResultsForSearch: -1 });
            $("#ParentId").bindSelect({ data:@Html.Raw(ViewData["ParentIdSelect"]) });
            $("#form1").formSerialize(@Html.Raw(ViewData["Model"]));
            $("#form1").find('.form-control,select,input').prop('disabled', 'true');

          
        }
    </script>
}